package com.tsd.common.vo;

import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse;

/**
 * @ClassName: WxPayNotifyResultVo
 * @Description: TODO
 * @Author: Hillpool
 * @Date: 2022/7/8 16:54
 * @Version: 1.0
 */
public class WxPayNotifyResultVo {

    private Long id;

    private String result;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public static WxPayNotifyResultVo success(String msg) {
        return WxPayNotifyResultVo.success(msg, null);
    }

    public static WxPayNotifyResultVo success(String msg, Long id) {
        WxPayNotifyResultVo resultVo = new WxPayNotifyResultVo();
        resultVo.setId(id);
        resultVo.setResult(WxPayNotifyResponse.success(msg));
        return resultVo;
    }

    public static WxPayNotifyResultVo fail(String msg) {
        return WxPayNotifyResultVo.fail(msg, null);
    }

    public static WxPayNotifyResultVo fail(String msg, Long id) {
        WxPayNotifyResultVo resultVo = new WxPayNotifyResultVo();
        resultVo.setId(id);
        resultVo.setResult(WxPayNotifyResponse.fail(msg));
        return resultVo;
    }
}
